MediaSetGWorld
TheMediaSetGWorld
function allows your derived media handler to learn about changes to your media's graphic environment.
pascal ComponentResult MediaSetGWorld (ComponentInstance ci, CGrafPtr aPort, GDHandle aGD);
ci
- Identifies the Movie Toolbox's connection to your derived media handler.
aPort
- Contains a pointer to the new graphics port. Note that this may be either a color or a black-and-white port.
aGD
- Contains a handle to the new graphics device.
DESCRIPTION
The Movie Toolbox calls your derived media handler'sMediaSetGWorld
function whenever your media's graphics world changes. The toolbox provides you with the
new graphics port and graphics device. You should then use this information for subsequent graphics operations.Your derived media handler should support this function if you perform specialized graphics processing or if you are using the Image Compression Manager to decompress your media. Note that when the Movie Toolbox calls your
MediaIdle
function, it supplies you with information about the current graphics environment. Consequently, you do not need to support theMediaSetGWorld
function in order to draw during playback. However, if your media data is compressed and you are using the Image Compression Manager to decompress sequences, you may need to provide updated graphics environment information before playback.You obtain the initial graphics environment information from the
moviePort
andmovieGD
fields of the movie parameter structure that the Movie Toolbox provides to yourMediaInitialize
function.The Movie Toolbox calls this function only if you have set the
handlerHasSpatial
flag to 1 in theflags
parameter of theMediaSetHandlerCapabilities
function.RESULT CODES
Any Component Manager result code
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help